	{if $SubmitSummary_Allow_Edit eq 1}{literal}
	<script type="text/javascript">
	//<![CDATA[
	function SetState(obj_checkbox, obj_textarea) {
		if(obj_checkbox.checked) {
			obj_textarea.disabled = false;
		}
		else {
			obj_textarea.disabled = true;
		}
	}
	//]]>
	</script>
	{/literal}{/if}
	<div id="newsnav_wrapper">
		<ul class="newsnav">
			<li class="active"><a href="#"><span>{#PLIGG_Visual_Submit2_Header#}</span></a></li>
		</ul>
	</div>
	<div id="submit" class="box">
		{checkActionsTpl location="tpl_pligg_submit_step2_start"}
		<form name="submitForm" id="submitForm" action="{$URL_submit}" method="post" enctype="multipart/form-data">
		<div class="divset">
			<h2><label for="title">{#PLIGG_Visual_Submit2_Title#}</label></h2>
			<div class="content">
				<input type="text" id="title" name="title" value="{if $submit_title}{$submit_title}{else}{$submit_url_title}{/if}" maxlength="{$maxTitleLength}" />
				<span class="submit_instructions">{#PLIGG_Visual_Submit2_TitleInstruct#}</span>
			</div>
			<div class="bottom"><!-- //--></div>
		</div>
		
		<div class="divset">
			<h2>
				<label for="category">{#PLIGG_Visual_Submit2_Category#}</label>
				{if $enable_group && $output neq ''}and <label>Group Submit</label>{/if}
			</h2>
			<div class="content">
				<table cellpadding="0" cellspacing="0">
					<tr>
						<td valign="top">
							<select id="category" name="category">
								<option value = "">{#PLIGG_Visual_Submit2_CatInstructSelect#}</option>
								{section name=thecat loop=$submit_cat_array}
								<option value="{$submit_cat_array[thecat].auto_id}"{if $submit_cat_array[thecat].auto_id == $submit_category} selected="selected"{/if}>
									{if $submit_cat_array[thecat].spacercount lt $submit_lastspacer}{$submit_cat_array[thecat].spacerdiff|repeat_count:''}{/if}
									{if $submit_cat_array[thecat].spacercount gt $submit_lastspacer}{/if}
									{$submit_cat_array[thecat].spacercount|repeat_count:'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'}
									{$submit_cat_array[thecat].name}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									{assign var=submit_lastspacer value=$submit_cat_array[thecat].spacercount}
								</option>
								{/section}
							</select>
							<span class="submit_instructions">{#PLIGG_Visual_Submit2_CatInstruct#}</span>
						</td>
						{if $enable_group && $output neq ''}
						<td width="20">&nbsp;</td>
						<td valign="top">
							{$output}
							<span class="submit_instructions">Choose your desired <a href="{$URL_groups}">Group</a> to submit to.</span>
						</td>
						{/if}
					</tr>
				</table>
			</div>
			<div class="bottom"><!-- //--></div>
		</div>
		
		{checkActionsTpl location="tpl_pligg_submit_step2_middle"}
		
		<div class="divset">
			<h2><label for="bodytext">{#PLIGG_Visual_Submit2_Description#}</label></h2>
			<div class="content">
				{if $Story_Content_Tags_To_Allow eq ""}
				<div class="msg_warning"><strong>{#PLIGG_Visual_Submit2_No_HTMLTagsAllowed#}</strong> {#PLIGG_Visual_Submit2_HTMLTagsAllowed#}</div>
				{else}
				<div class="msg_warning"><strong>{#PLIGG_Visual_Submit2_HTMLTagsAllowed#}:</strong> {$Story_Content_Tags_To_Allow}</div>
				{/if}
				<textarea name="bodytext" id="bodytext" rows="7" cols="10" wrap="soft">{if $submit_url_description}{$submit_url_description}{/if}{$submit_content}</textarea><br />
				<span class="submit_instructions">{#PLIGG_Visual_Submit2_DescInstruct#}</span>
			</div>
			<div class="bottom"><!-- //--></div>
		</div>
		
		{if $SubmitSummary_Allow_Edit eq 1}
		<div class="divset">
			<h2><label for="summarytext">{#PLIGG_Visual_Submit2_Summary#}</label></h2>
			<div class="content">
				<input type="checkbox" name="summarycheckbox" id="summarycheckbox" onclick="SetState(this, this.form.summarytext)" /> <label for="summarycheckbox">{#PLIGG_Visual_Submit2_SummaryCheckBox#}</label>
				{if $Story_Content_Tags_To_Allow eq ""}
				<div class="msg_warning"><strong>{#PLIGG_Visual_Submit2_No_HTMLTagsAllowed#}</strong> {#PLIGG_Visual_Submit2_HTMLTagsAllowed#}</div>
				{else}
				<div class="msg_warning"><strong>{#PLIGG_Visual_Submit2_HTMLTagsAllowed#}:</strong> {$Story_Content_Tags_To_Allow}</div>
				{/if}
				<textarea name="summarytext" id="summarytext" rows="5" cols="10" disabled="disabled" wrap="soft">{$submit_summary}</textarea>
				<span class="submit_instructions">{#PLIGG_Visual_Submit2_SummaryInstruct#}{#PLIGG_Visual_Submit2_SummaryLimit#}{$StorySummary_ContentTruncate}{#PLIGG_Visual_Submit2_SummaryLimitCharacters#}</span>
			</div>
			<div class="bottom"><!-- //--></div>
		</div>
		{/if}
		
		{checkActionsTpl location="tpl_header_admin_main_comment_subscription"}
	
		{if $enable_tags}
		<div class="divset">
			<h2><label for="tags">{#PLIGG_Visual_Submit2_Tags#}</label></h2>
			<div class="content">
				<input type="text" id="tags" name="tags" value="{$tags_words}" maxlength="{$maxTagsLength}" />
				<span class="submit_instructions">
					<strong>{#PLIGG_Visual_Submit2_Tags_Inst1#}</strong> {#PLIGG_Visual_Submit2_Tags_Example#} <em>{#PLIGG_Visual_Submit2_Tags_Inst2#}</em>
				</span>
			</div>
			<div class="bottom"><!-- //--></div>
		</div>
		{/if}
		{*
		{if $Submit_Show_URL_Input eq 1}
		<div class="divset">
			<h2><label for="trackback">{#PLIGG_Visual_Submit2_Trackback#}</label></h2>
			<div class="content">
				<input type="text" name="trackback" id="trackback" value="{$submit_trackback}" />
				<span class="submit_instructions">{#PLIGG_Visual_Submit2_TrackbackInstruct#}</span>
			</div>
			<div class="bottom"><!-- //--></div>
		</div>
		{/if}
		*}		
		{checkActionsTpl location="submit_step_2_pre_extrafields"}
		{include file=$tpl_extra_fields.".tpl"}
		
		{if isset($register_step_1_extra)}
		<div class="divset">
			<h2><label>Human Verification</label></h2>
			<div class="content">
				{$register_step_1_extra}
			</div>
			<div class="bottom"><!-- //--></div>
		</div>
		{/if}
		<div class="divset">
			{checkActionsTpl location="tpl_pligg_submit_preview_start"}
			<h2>{#PLIGG_Visual_Story_Preview#}</h2>
			<div class="content" id="previewSubmit">
				<div class="clearfix">
					<ul>
						<li class="columns submitter">
							{php}
							global $main_smarty, $current_user;
							
							if ($current_user->user_id > 0 && $current_user->authenticated) {
								$login=$current_user->user_login;
							}
							$user=new User();
							$user->username = $login;
							$main_smarty->assign('user_username', $user->username);
							$main_smarty->assign('user_url_personal_data', getmyurl('user2', $login, 'profile'));
							$main_smarty->assign('Avatar_ImgSrc', get_avatar('large', "", "", "", $current_user->user_id));
							{/php}
							<a href="{$submitter_profile_url}"><img src="{$Avatar_ImgSrc}" height="30" width="30" alt="{$link_submitter} avatar" /></a>
						</li>
						<li class="columns title">
							<h2 id="previewTitle">{if $submit_title}{$submit_title}{else}{$submit_url_title}{/if}</h2>
							<div class="meta small_font">{if $url_short neq "http://" && $url_short neq "://"}<a href="{$url}" target="_blank">{$url_short} <img src="{$my_pligg_base}/templates/{$the_template}/images/icons/link.png" alt="" /></a>{else}{$No_URL_Name}{/if}</div>
						</li>
						<li class="columns vote">
							{checkActionsTpl location="tpl_pligg_story_votebox_start"}
							<ul>
								<li class="votes">1</li>
								<li id="xvote-{$link_shakebox_index}">
									<ul>
										<li><img src="{$my_pligg_base}/templates/{$the_template}/images/vote_voted.png" alt="{#PLIGG_Visual_Vote_Cast#}" /></li>
										<li><img src="{$my_pligg_base}/templates/{$the_template}/images/vote_buried_down.png" alt="{#PLIGG_Visual_Vote_Bury#}" /></li>
									</ul>
								</li>
							</ul>
							{checkActionsTpl location="tpl_pligg_story_votebox_end"}
						</li>
					</ul>
				</div>
				<div class="summary clearfix">
					{checkActionsTpl location="tpl_pligg_submit_preview_middle"}
					<div id="previewSummary">{if $submit_url_description}{$submit_url_description}{/if}{$submit_content}</div>
					<span id="previewTags" class="tags">{$tags_words}</span>
				</div>			
			</div>
			<div class="bottom"><!-- //--></div>
		</div>
		{literal}
		<script type="text/javascript">
		jQuery(document).ready(function() {
			jQuery('#title, #bodytext, #tags').bind('blur keyup',function() {
				jQuery('#previewTitle').text($('#title').val());				
				jQuery('#previewSummary').text($('#bodytext').val());
				jQuery('#previewSummary').html($('#previewSummary').html().replace(/\n/g,'<br />'));
				jQuery('#previewTags').text($('#tags').val());
			});
		});
		</script>
		{/literal}
		<input type="hidden" name="url" id="url" value="{$submit_url}" />
		<input type="hidden" name="phase" value="2" />
		<input type="hidden" name="randkey" value="{$randkey}" />
		<input type="hidden" name="id" value="{$submit_id}" />
		<input type="submit" value="{#PLIGG_Visual_Submit2_Continue#}" class="submit_button" />
		{checkActionsTpl location="tpl_pligg_submit_step2_end"}
		</form>
	</div>